import{DEFAULT_USERINFO_KEY}from '../constants/index'
export function getUserInfo(){
    let user = localStorage.getItem(DEFAULT_USERINFO_KEY)
    if(user === undefined){
        return null;
    }else{
        return JSON.parse(user)
    }
}
export function setUserInfo(value){
    let user = null;
    if (value != undefined && value != null){
        user = value
    }
    localStorage.setItem(DEFAULT_USERINFO_KEY,JSON.stringify(value))
}